••• NOTE: Mr.Player and the Async Family are SHAREWARE.
••• Please read the documentation for more details.
• TECHNICAL INTRODUCTION
◊ Mr.Player is an Apple-Event driven background-only application (file type 'appe') which is loaded at startup after the extensions and control panels. It is not an INIT, and it doesn't patch any traps. Being an application it has its own heap zone to work with, so it shouldn't mess up with the system heap (even though many Sound Manager routines allocate system heap memory). Mr.Player takes a memory partition of 40K, which is enough for its own code and for all the Sound Manager data structures it allocates - but not enough for the actual sound data, which is always loaded in temporary memory. Since the Mac isn't always playing sounds, sound memory is only allocated upon request.
◊ The Mr.Player application itself has no user interface; it is driven through System 7's Apple Events, which can be easily implemented in any application. You may also send Apple Events directly with many utilities such as CE's QuicKeys™2. If you want Mr.Player to play asynchronous multi-channel sounds for you, you can do it with a few lines of code. Please note that you'll need my written permission to redistribute Mr.Player with your own programs, event if they are free or shareware.
◊ Mr.Player installs a Gestalt selector of type 'ßaππ'; the selector returns a pointer to a data structure whose first item is Mr.Player's process serial number. Call Gestalt to know whether Mr.Player is currently installed (Gestalt will return an error if Mr.Player has quit) and to get its process serial number:
OSErr GetMrPlayerPSN (ProcessSerialNumber *psn)
{
ProcessSerialNumber *result;
OSErr error;
error = Gestalt ('ßaππ', (long*)&result);
if(error) return (error);
*psn = *result;
return (noErr);
}
◊ If this routine returns an error, Mr.Player is not running. If it doesn't, you may use the process serial number to send your events to Mr.Player.